package com.nervenets.web.controller.news;

import com.nervenets.web.controller.TokenParams;
import com.nervenets.web.enumeration.NewsType;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;

@EqualsAndHashCode(callSuper = true)
@Data
public class NewsEditParams extends TokenParams {
    @ApiModelProperty(value = "资讯Id，传0或不传时为新建")
    private long newsId;
    @ApiModelProperty(value = "团队ID", required = true)
    @Positive(message = "团队ID不能为空")
    private long managerId;
    @ApiModelProperty(value = "资讯类型", required = true)
    @NotNull(message = "资讯类型不能为空")
    private NewsType type;
    @ApiModelProperty(value = "资讯标题")
    private String title;
    @ApiModelProperty(value = "资讯内容", required = true)
    @NotNull(message = "资讯内容不能为空")
    private String content;
}
